﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace PongXNA
{
    class Button
    {
        public Button()
        {

        }

        public Button(Texture2D texture2d)
        {
            SpriteButton = texture2d;
        }

        public void ButtonInit(Vector2 vectorposition, Rectangle hitbox, float taille)
        {
            VectorPosition = vectorposition;
            HitBox = hitbox;
            HitBox = new Rectangle(HitBox.X, HitBox.Y, (int)((float)taille), (int)((float)HitBox.Height * taille / HitBox.Width));
        }

        private Rectangle _hitbox; // we need to have a hitbox for testing if an object touch them
        public Rectangle HitBox
        {
            get { return _hitbox; }
            set { _hitbox = value; }
        }

        private Vector2 _vectorposition;// we need to have a position for the Racket
        public Vector2 VectorPosition
        {
            get { return _vectorposition; }
            set { _vectorposition = value; }
        }

        private Texture2D _spritebutton;
        public Texture2D SpriteButton
        {
            get { return _spritebutton; }
            set { _spritebutton = value; }
        }
    }
}
